<?php

  // define array
  $movies = array (
    10 => 'The Lion King',
    1 => 'Cars',
    2 => "A Bug\"s Life",
  );

  //print_r($movies);
  # remove element from beginning of array
  array_shift($movies);
  print_r($movies);
  # remove element from end of array
  array_pop($movies);
  print_r($movies);
  # add element to end of array
  array_push($movies, 'sholay');
  print_r($movies);

  # add element to beginning of array
  echo array_unshift($movies, 'The Incredibles');
  print_r($movies);
